﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.Master" AutoEventWireup="true" CodeBehind="consultarUsuario.aspx.cs" Inherits="qbaproject.Usuario.Consultar.consultarUsuario" %>
<%@ Register TagPrefix="asp" Namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" %>
<asp:Content ID="HeadContent" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="MainContent" ContentPlaceHolderID="MainContent" runat="server">
    <div id="page-wrapper">
		<div id="main-wrapper">
			<div id="main-content">
                <asp:HiddenField ID="hdfIdUsuarioRemover" runat="server"></asp:HiddenField>
                <!-- Área de Validação abaixo -->
                <div style="display:none;">
                    <asp:HyperLink ID="linkMsn" runat="server">HyperLink</asp:HyperLink>
                </div>
                <asp:ModalPopupExtender ID="ModalPopupRemover" TargetControlID="linkMsn" runat="server"
                    PopupControlID="PainelMsn" CancelControlID="btnCancelarMsn" BackgroundCssClass="modalBackground">
                </asp:ModalPopupExtender>
                <asp:Panel ID="PainelMsn" runat="server" Style="display: none" Width="350px" CssClass="modalPopup">
                    <asp:Panel ID="PainelCabecalho" runat="server" Style="height: 25px;">
                        <div>
                            <div class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix" style="font-size: 10px">
                                <span class="ui-dialog-title" id="ui-dialog-title-login">
                                    Atenção
                                </span> 
                            </div>
                            <div style="text-align:center">
                                <b><p>Deseja remover esse tipo de produto?</p></b>
                                <div style="float: right">
				                    <asp:LinkButton ID="lkbSim" CssClass="btn ui-state-default ui-corner-all" 
                                        runat="server" OnClick="lkbSim_Click" ><span class="ui-icon ui-icon-check"></span>Sim</asp:LinkButton>
			                        <asp:LinkButton ID="lkbNao" CssClass="btn ui-state-default ui-corner-all" 
                                        runat="server" OnClick="lkbNao_Click" ><span class="ui-icon ui-icon-cancel"></span>Não</asp:LinkButton>
                                </div>
                            </div>
                        </div>
                    </asp:Panel>
                </asp:Panel>
                <!-- Final Área de Validação -->
				<div class="title title-spacing">
					<h2>Usuários </h2>
                    Usuário
				</div>
               
                <div class="response-msg success ui-corner-all" runat="server" id="divMsnPesquisaSucesso" visible="false">
					<span>Sucesso!</span>
					<asp:Label ID="lblNumEncontrados" runat="server" Text="" />.
				</div>
                <div class="response-msg notice ui-corner-all" runat="server" id="divMsnPesquisaAtencao" visible="false">
					<span>Atenção!</span>
					Não foram encontrados nenhum registro com essas informações.
				</div>
                 <div style="height:30px;">
                    <asp:LinkButton ID="lnk" CssClass="btn ui-state-default ui-corner-all" 
                                        runat="server" onclick="lnk_Click" ><span class="ui-icon ui-icon-plus"></span>Novo</asp:LinkButton>
                </div>
                <div class="portlet ui-widget ui-widget-content ui-helper-clearfix ui-corner-all form-container">
					<div class="portlet-header ui-widget-header">Pesquisa</div>
					<div class="portlet-content">
					    <ul>
						    <li>
							    <label  class="desc">
								    Nome do usuário (ex. itgirl2012)
							    </label>
							    <div>
                                    <asp:TextBox ID="txtNmUsuario" MaxLength="255" CssClass="field text small" 
                                        runat="server" Text=""></asp:TextBox>
							    </div>
						    </li>
                           <li>
							    <label  class="desc">
								    Primeiro nome
							    </label>
                                 
							    <div>
                                    <asp:TextBox ID="txtTeNome" MaxLength="255" CssClass="field text small" runat="server" Text=""></asp:TextBox>
							    </div>
                                <div>
                                    <asp:Label Text="" runat="server" ID="lblTeNomeObrigatorio" ForeColor="Red" />
                                </div>
						    </li>
                            <li>
							    <label  class="desc">
								    Sobrenome
							    </label>
                                 
							    <div>
                                    <asp:TextBox ID="txtTeSobrenome" MaxLength="255" CssClass="field text small" runat="server" Text=""></asp:TextBox>
							    </div>
                                <div>
                                    <asp:Label Text="" runat="server" ID="lblTeSobrenomeObrigatorio" ForeColor="Red" />
                                </div>
						    </li>
                            <li>
							    <label  class="desc">
								    Sexo
							    </label>
                                 
							    <div>
							        
                                    <asp:RadioButtonList ID="rblCsSexo" runat="server">
                                        <asp:ListItem Value="M" Text="Masculino" > </asp:ListItem>
                                        <asp:ListItem Value="F" Text="Feminino" > </asp:ListItem>
                                    </asp:RadioButtonList> 
                                </div>
                                <div>
                                    <asp:Label Text="" runat="server" ID="lblCsSexoObrigatorio" ForeColor="Red" />
                                </div>
						    </li>
                            <li>
							    <label  class="desc">
								    Data de nascimento
							    </label>
							    <div>
                                    <asp:TextBox ID="txtDtNascimento"  MaxLength="255" CssClass="field text small" runat="server" Text=""></asp:TextBox>
                                            
                                    <asp:Image ID="imgCalendario" ImageUrl="calendar-icon.png" runat="server" />
                                    <ajaxToolkit:MaskedEditExtender  TargetControlID="txtDtNascimento" MaskType="Date" Mask="99/99/9999" 
                                    ClearMaskOnLostFocus="False" ID="MaskedEditExtender1" runat="server">
                                    </ajaxToolkit:MaskedEditExtender >
                                    <ajaxToolkit:CalendarExtender ID="CalendarExtender1"  PopupButtonID="imgCalendario" TargetControlID="txtDtNascimento" runat="server" Format="dd/MM/yyyy">
                                    </ajaxToolkit:CalendarExtender>
                                            
							    </div>
						    </li>

                            <li>
                                <label  class="desc">
								    Descrição
							    </label>
                                <div>
                                    <asp:TextBox ID="txtDsUsuario" TextMode="MultiLine" Rows="5" Columns="28"
                                        CssClass="field text medium" runat="server" Text="" ></asp:TextBox>
							    </div>
                                <div>
                                    <asp:Label Text="" runat="server" ID="lblDsUsuarioObrigatoria" ForeColor="Red" />
                                </div>
						    </li>
                            <li>
                                <label  class="desc">
								    E-mail
							    </label>
                                <div>
                                    <asp:TextBox ID="txtTeEmail" CssClass="field text medium" runat="server" Text="" ></asp:TextBox>
							    </div>
                                <div>
                                    <asp:Label Text="" runat="server" ID="lblTeEmailObrigatorio" ForeColor="Red" />
                                </div>
						    </li>
                            <li>
                                <label  class="desc">
								    Site
							    </label>
                                <div>
                                    <asp:TextBox ID="txtTeUrl" CssClass="field text medium" runat="server" Text="" ></asp:TextBox>
							    </div>
                                <div>
                                    <asp:Label Text="" runat="server" ID="lblTeUrlObrigatoria" ForeColor="Red" />
                                </div>
						    </li>
                            <li>
                                <label  class="desc">
								    Tipo de pele
							    </label>
                                <div>
                                    <asp:DropDownList ID="ddlTiposPele" DataValueField="id_tipo_pele" DataTextField="nm_tipo_pele" runat="server" CssClass="field">
                                    </asp:DropDownList>
                                </div>
                                <div>
                                    <asp:Label Text="" runat="server" ID="lblDdlTipoPeleObrigatoria" ForeColor="Red" />
                                </div>
                            </li>
                            <li>
                                <label  class="desc">
								    Cor de pele
							    </label>
                                <div>
                                    <asp:DropDownList ID="ddlCoresPele" DataValueField="id_cor_pele" DataTextField="nm_cor_pele" runat="server" CssClass="field">
                                    </asp:DropDownList>
                                </div>
                                <div>
                                    <asp:Label Text="" runat="server" ID="lblDdlCorPeleObrigatoria" ForeColor="Red" />
                                </div>
                            </li>
                            <li>
                                <label  class="desc">
								    Tipo de cabelo
							    </label>
                                <div>
                                    <asp:DropDownList ID="ddlTiposCabelo" DataValueField="id_tipo_cabelo" DataTextField="nm_tipo_cabelo" runat="server" CssClass="field">
                                    </asp:DropDownList>
                                </div>
                                <div>
                                    <asp:Label Text="" runat="server" ID="lblDdlTipoCabeloObrigatoria" ForeColor="Red" />
                                </div>
                            </li>
                            <li>
                                <label  class="desc">
								    Cor de cabelo
							    </label>
                                <div>
                                    <asp:DropDownList ID="ddlCoresCabelo" DataValueField="id_cor_cabelo" DataTextField="nm_cor_cabelo" runat="server" CssClass="field">
                                    </asp:DropDownList>
                                </div>
                                <div>
                                    <asp:Label Text="" runat="server" ID="lblDdlCorCabeloObrigatoria" ForeColor="Red" />
                                </div>
                            </li>
                            <li>
                                <label  class="desc">
								    Perfil de compra
							    </label>
                                <div>
                                    <asp:DropDownList ID="ddlPerfisCompra" DataValueField="id_perfil_compra" DataTextField="nm_perfil_compra" runat="server" CssClass="field">
                                    </asp:DropDownList>
                                </div>
                                <div>
                                    <asp:Label Text="" runat="server" ID="lblDdlPerfilCompraObrigatoria" ForeColor="Red" />
                                </div>
                            </li>
                            <li class="buttons">
                                <div>
				                    <asp:LinkButton ID="lkbPesquisar" CssClass="btn ui-state-default ui-corner-all" 
                                        runat="server" onclick="lkbPesquisar_Click"><span class="ui-icon ui-icon-search"></span>Pesquisar</asp:LinkButton>
			                    </div>
							</li>
                        </ul>
                    </div>
                </div>
				<div class="portlet ui-widget ui-widget-content ui-helper-clearfix ui-corner-all form-container">
					<div class="portlet-header ui-widget-header">Resultado da Pesquisa</div>
					<div class="portlet-content">
                        <div>
                            <asp:GridView ID="grdResUsuario" runat="server" AutoGenerateColumns="False" 
                                onrowcommand="grdResUsuario_RowCommand" 
                                onpageindexchanging="grdResUsuario_PageIndexChanging" BackColor="White" 
                                BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
                                Width="100%"  ForeColor="Black" GridLines="Vertical" >
                                <Columns>
                                    <asp:BoundField DataField="nm_usuario" HeaderText="Usuário" >
                                        <ItemStyle CssClass="bdGrid" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1" />
                                    </asp:BoundField>
                                    <asp:TemplateField HeaderText="Nome" >
                                        <ItemStyle  CssClass="bdGrid" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1"></ItemStyle>
                                        <ItemTemplate>
                                            <%# Eval("te_nome")%> <%# Eval("te_sobrenome") %>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="cs_sexo" HeaderText="Sexo" >
                                        <ItemStyle CssClass="bdGrid" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="nm_tipo_pele" HeaderText="Tipo da pele" >
                                        <ItemStyle CssClass="bdGrid" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="nm_cor_pele" HeaderText="Cor da pele" >
                                        <ItemStyle CssClass="bdGrid" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="nm_tipo_cabelo" HeaderText="Tipo de cabelo" >
                                        <ItemStyle CssClass="bdGrid" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="nm_cor_cabelo" HeaderText="Cor de cabelo" >
                                        <ItemStyle CssClass="bdGrid" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="nm_perfil_compra" HeaderText="Perfil de compra" >
                                        <ItemStyle CssClass="bdGrid" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1" />
                                    </asp:BoundField>
                                    <asp:TemplateField>
                                        <ItemStyle Width="65px" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1"/>
                                        <ItemTemplate>
                                            <asp:linkbutton ID="Linkbutton1" CssClass="btn_no_text btn ui-state-default ui-corner-all tooltip" title="Editar" text="" runat="server" CommandName="editar" CommandArgument='<%# Eval("id_usuario")%>'><span class="ui-icon ui-icon-wrench"></span></asp:linkbutton>
                                            <asp:linkbutton ID="Linkbutton2" CssClass="btn_no_text btn ui-state-default ui-corner-all tooltip" title="Remover" text="" runat="server" CommandName="remover" CommandArgument='<%# Eval("id_usuario")%>'><span class="ui-icon ui-icon-trash"></span></asp:linkbutton>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <HeaderStyle CssClass="headerGrid" />
                                <RowStyle  CssClass="trGrid" />
                                <PagerStyle CssClass="trPager" />
                            </asp:GridView>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Content>